;;-----------------------------------------------------------------------------
;;   File:      dscr.a51
;;   Contents:  This file contains descriptor data tables.
;;
;; $Archive: /USB/Examples/Fx2lp/bulkloop/dscr.a51 $
;; $Date: 9/01/03 8:51p $
;; $Revision: 3 $
;;
;;
;;-----------------------------------------------------------------------------
;; Copyright 2003, Cypress Semiconductor Corporation
;;-----------------------------------------------------------------------------;;-----------------------------------------------------------------------------
   
DSCR_DEVICE   equ   1   ;; Descriptor type: Device
DSCR_CONFIG   equ   2   ;; Descriptor type: Configuration
DSCR_STRING   equ   3   ;; Descriptor type: String
DSCR_INTRFC   equ   4   ;; Descriptor type: Interface
DSCR_ENDPNT   equ   5   ;; Descriptor type: Endpoint
DSCR_DEVQUAL  equ   6   ;; Descriptor type: Device Qualifier

DSCR_DEVICE_LEN   equ   18
DSCR_CONFIG_LEN   equ    9
DSCR_INTRFC_LEN   equ    9
DSCR_ENDPNT_LEN   equ    7
DSCR_DEVQUAL_LEN  equ   10

ET_CONTROL   equ   0   ;; Endpoint type: Control
ET_ISO       equ   1   ;; Endpoint type: Isochronous
ET_BULK      equ   2   ;; Endpoint type: Bulk
ET_INT       equ   3   ;; Endpoint type: Interrupt

public      DeviceDscr, DeviceQualDscr, HighSpeedConfigDscr, FullSpeedConfigDscr, StringDscr,BOSDscr, BOSFeatureDscr, BOSPropertyDscr, UserDscr

DSCR   SEGMENT   CODE PAGE

;;-----------------------------------------------------------------------------
;; Global Variables
;;-----------------------------------------------------------------------------
      rseg DSCR      ;; locate the descriptor table in on-part memory.

DeviceDscr:   
      db   DSCR_DEVICE_LEN      ;; Descriptor length
      db   DSCR_DEVICE   ;; Decriptor type
      dw   1002H      ;; Specification Version (BCD)
      db   0EFH        ;; Device class
      db   02H         ;; Device sub-class
      db   01H         ;; Device sub-sub-class
      db   64         ;; Maximum packet size
      dw   280dH      ;; Vendor ID
      dw   0402H      ;; Product ID (Sample Device)
      dw   0001H      ;; Product version ID
      db   1         ;; Manufacturer string index
      db   2         ;; Product string index
      db   3         ;; Serial number string index
      db   1         ;; Number of configurations

DeviceQualDscr:
      db   DSCR_DEVQUAL_LEN   ;; Descriptor length
      db   DSCR_DEVQUAL   ;; Decriptor type
      dw   0002H      ;; Specification Version (BCD)
      db   00H        ;; Device class
      db   00H         ;; Device sub-class
      db   00H         ;; Device sub-sub-class
      db   64         ;; Maximum packet size
      db   1         ;; Number of configurations
      db   0         ;; Reserved

HighSpeedConfigDscr:   
      db   DSCR_CONFIG_LEN               ;; Descriptor length
      db   DSCR_CONFIG                  ;; Descriptor type
      db   (HighSpeedConfigDscrEnd-HighSpeedConfigDscr) mod 256 ;; Total Length (LSB)
      db   (HighSpeedConfigDscrEnd-HighSpeedConfigDscr)  /  256 ;; Total Length (MSB)
      db   1      ;; Number of interfaces
      db   1      ;; Configuration number
      db   0      ;; Configuration string
      db   10000000b   ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu)
      db   0FAH      ;; Power requirement (div 2 ma)

;; Interface Descriptor
      db   DSCR_INTRFC_LEN      ;; Descriptor length
      db   DSCR_INTRFC         ;; Descriptor type
      db   0               ;; Zero-based index of this interface
      db   0               ;; Alternate setting
      db   2               ;; Number of end points 
      db   0ffH            ;; Interface class
      db   00H               ;; Interface sub class
      db   00H               ;; Interface sub sub class
      db   4               ;; Interface descriptor string index
      
;; Endpoint Descriptor
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   02H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   00H               ;; Maximun packet size (LSB)
      db   02H               ;; Max packect size (MSB)
      db   00H               ;; Polling interval


;; Endpoint Descriptor
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   86H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   00H               ;; Maximun packet size (LSB)
      db   02H               ;; Max packect size (MSB)
      db   00H               ;; Polling interval

HighSpeedConfigDscrEnd:   

FullSpeedConfigDscr:   
      db   DSCR_CONFIG_LEN               ;; Descriptor length
      db   DSCR_CONFIG                  ;; Descriptor type
      db   (FullSpeedConfigDscrEnd-FullSpeedConfigDscr) mod 256 ;; Total Length (LSB)
      db   (FullSpeedConfigDscrEnd-FullSpeedConfigDscr)  /  256 ;; Total Length (MSB)
      db   1      ;; Number of interfaces
      db   1      ;; Configuration number
      db   0      ;; Configuration string
      db   10000000b   ;; Attributes (b7 - buspwr, b6 - selfpwr, b5 - rwu)
      db   0FAH      ;; Power requirement (div 2 ma)

;; Interface Descriptor
      db   DSCR_INTRFC_LEN      ;; Descriptor length
      db   DSCR_INTRFC         ;; Descriptor type
      db   0               ;; Zero-based index of this interface
      db   0               ;; Alternate setting
      db   2               ;; Number of end points 
      db   0ffH            ;; Interface class
      db   00H               ;; Interface sub class
      db   00H               ;; Interface sub sub class
      db   0               ;; Interface descriptor string index
      
;; Endpoint Descriptor
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   02H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   40H               ;; Maximun packet size (LSB)
      db   00H               ;; Max packect size (MSB)
      db   00H               ;; Polling interval

;; Endpoint Descriptor
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   86H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   40H               ;; Maximun packet size (LSB)
      db   00H               ;; Max packect size (MSB)
      db   00H               ;; Polling interval

FullSpeedConfigDscrEnd:   

StringDscr:

StringDscr0:   
      db   StringDscr0End-StringDscr0      ;; String descriptor length
      db   DSCR_STRING
      db   09H,04H
StringDscr0End:

StringDscr1:   
      db   StringDscr1End-StringDscr1      ;; String descriptor length
      db   DSCR_STRING
      db   'A',00
      db   'r',00
      db   'm',00
StringDscr1End:

StringDscr2:   
      db   StringDscr2End-StringDscr2      ;; Descriptor length
      db   DSCR_STRING
      db   'C',00
      db   'M',00
      db   'S',00
      db   'I',00
      db   'S',00
      db   '-',00
      db   'D',00
      db   'A',00
      db   'P',00
      db   ' ',00
      db   'V',00
      db   '2',00
StringDscr2End:

StringDscr3:   
      db   StringDscr3End-StringDscr3      ;; Descriptor length
      db   DSCR_STRING
      db   '1',00
      db   '1',00
      db   '2',00
      db   '2',00
      db   '3',00
      db   '3',00
      db   '4',00
      db   '4',00
      db   '5',00
      db   '5',00
StringDscr3End:

StringDscr4:   
      db   StringDscr4End-StringDscr4     ;; Descriptor length
      db   DSCR_STRING
      db   'C',00
      db   'M',00
      db   'S',00
      db   'I',00
      db   'S',00
      db   '-',00
      db   'D',00
      db   'A',00
      db   'P',00
      db   ' ',00
      db   'v',00
      db   '2',00
StringDscr4End:

BOSDscr:
	db   12H, 03H
	db   'M', 00H
	db   'S', 00H
	db   'F', 00H
	db   'T', 00H
	db   '1', 00H
	db   '0', 00H
	db   '0', 00H
	db   17H, 00H
BOSDscrEND:


BOSFeatureDscr:
	db 28H, 00H, 00H, 00H
	db 00H, 01H
	db 04H, 00H
	db 01H
	db 00H, 00H, 00H, 00H, 00H, 00H, 00H
	db 00H
	db 01H
	db 'W', 'I', 'N', 'U', 'S', 'B', 00H, 00H
	db 00H, 00H, 00H, 00H, 00H, 00H, 00H, 00H
	db 00H, 00H, 00H, 00H, 00H, 00H
BOSFeatureDscrEnd:

BOSPropertyDscr:
	db 8eH, 00H, 00H, 00H
	db 00H, 01H
	db 05H, 00H
	db 01H, 00H
	db 84H, 00H, 00H, 00H
	db 01H, 00H, 00H, 00H
	db 28H, 00H
	db 'D', 00H, 'e', 00H, 'v', 00H, 'i', 00H
	db 'c', 00H, 'e', 00H, 'I', 00H, 'n', 00H
	db 't', 00H, 'e', 00H, 'r', 00H, 'f', 00H
	db 'a', 00H, 'c', 00H, 'e', 00H, 'G', 00H
	db 'U', 00H, 'I', 00H, 'D', 00H, 00H, 00H
	db 4eH, 00H, 00H, 00H
	db '{', 00H, 'C', 00H, 'D', 00H, 'B', 00H
	db '3', 00H, 'B', 00H, '5', 00H, 'A', 00H
	db 'D', 00H, '-', 00H, '2', 00H, '9', 00H
	db '3', 00H, 'B', 00H, '-', 00H, '4', 00H
	db '6', 00H, '6', 00H, '3', 00H, '-', 00H
	db 'A', 00H, 'A', 00H, '3', 00H, '6', 00H
	db '-', 00H, '1', 00H, 'A', 00H, 'A', 00H
	db 'E', 00H, '4', 00H, '6', 00H, '4', 00H
	db '6', 00H, '3', 00H, '7', 00H, '7', 00H
	db '6', 00H, '}', 00H, 00H, 00H
BOSPropertyDscrEnd:

UserDscr:      
      dw   0000H
      end
      
